package com.ys.peony.base.contract;

import com.ys.peony.base.BaseContract;
import com.ys.peony.base.BaseModel;
import com.ys.peony.car300.ItemModel;
import com.ys.peony.http.base.BaseRespBean;

import java.util.List;
import java.util.Map;

/**
 * 描述：车300相关业务逻辑接口定义
 * Created by 59153 on 2017/7/31.
 */

public class CarPledgeContract extends BaseContract{

    public final static int GET_CAR_VIN = 1;
    public final static int GET_CAR_DETAIL = 2;
    public final static int SAVE_CAR_INFO = 3;
    public final static int ADD_CAR_BAODAN = 4;
    public final static int DELETE_CAR_BAODAN = 5;
    public final static int DELETE_CAR = 6;
    public final static int CODE_GET_CITY = 8;

    public interface iCarPledgeView extends BaseContract.IBaseView {
        void onSuccess(int code);
    }

    public interface iCarInfoView extends BaseContract.IBaseView {
        void onResult(Object o);
    }

    public interface iCarInfo2View extends BaseContract.IBaseView {
        void onResult(int code);

        void onSuccess();
    }

    public interface ICarSelectView extends BaseContract.IBaseView {
        void onSuccess(int code);
    }
    public interface ICarUpdateView extends BaseContract.IBaseView {
        void onSuccess(int code);
    }

    /**
     * 保单view
     */
    public interface iBaodanView extends BaseContract.IBaseView {
        void onSuccess(int code);
    }

    public interface iAddBaoDanView extends BaseContract.IBaseView {
        void onSuccess(int code);
    }

    public interface iCarPledgePresenter extends BaseContract.IBasePresenter {
        void getPledgeUserList();

        void getCarByVin(String vin);

        void getCarInfoById(String loanId);

        boolean isValidInput(String input);

        List<ItemModel> getItemModel(List list, int viewId);

        String getItemTextById(List list,int viewId,String id);

        void getCity();

        void addPledgeCar();

        void updatePledgeCar();

        void deletePledgeCar(String mortgageId);

        void onSuccess(Object model);

        void onFail(String msg);

        void addBaoDanInfo(String vehicle_id,String baodanId);

        void deleteBaoDan(String baodan_id);

    }

    public interface iCarPledgeModel extends BaseContract.IBaseModel {
        void getCarByVin(String vin);

        void getCarInfoById(long loanId, long userId);

        void getCity();

        void addPledgeCar(Map<String, Object> params);

        void updatePledgeCar(Map<String, Object> params);

        void addBaoDanInfo(Map<String, Object> params);

        void deleteBaoDan(Map<String, Object> params);

        void deleteCar(Map<String, Object> params);
    }
}
